import { requestToData, requestToStatus, requestToExport } from '@/api/commonHttp';

// 单据信息查询
export const getRecordInfoService = (data, target) => requestToData({
  url: '/sysback/modifySkuSaleAttr/getRecordInfo',
  type: 'get',
  data,
  isFormData: true,
  target
});

// 修改SKU规格提交
export const commitService = (data, loadingFn) => requestToStatus({
  url: '/sysback/modifySkuSaleAttr/commit',
  type: 'post',
  data,
  loadingFn
});

// SKU信息查询
export const getSkuSpecListService = (data, loadingFn) => requestToData({
  url: '/sysback/modifySkuSaleAttr/getSkuSpecList',
  type: 'post',
  data,
  loadingFn
});

// SKU信息分页查询
export const getSkuPagerService = (data, loadingFn) => requestToData({
  url: '/sysback/modifySkuSaleAttr/getSkuPager',
  type: 'post',
  data,
  loadingFn
});

// SKU导出
export const exportExcelService = (data, loadingFn) => requestToExport({
  url: '/sysback/modifySkuSaleAttr/exportExcel',
  type: 'post',
  data,
  loadingFn
});
